#pragma once

#include "GLGlobalInfo.h"

#include "entity/GLAnimal.h"

#include "entity/GLPrivateBodyPack.h"
#include "entity/GLPrivatePack.h"
#include "entity/GLPrivateStore.h"
#include "entity/GLPrivateTrade.h"
#include "entity/GLShanghui.h"
#include "entity/GLSoulSpirit.h"
#include "entity/GLWeaponSlot.h"
#include "entity/GLGroup.h"

class CILogicPerson : public CGLAnimalSenior
{
	enum PersonIndex {
		PContainerPack,
		PContainerBody,
		PContainerStore,
		PContainerTrade,
		PContainerSoul,
		PContainerWeapon,
		PContainerShanghui,
		PGroup,

		PIndexCount,
	};
#define Person_Property_Set_Get_Func(Type, ClassName, ObjName) \
public:	\
	inline ClassName* Get##ObjName() const { return dynamic_cast<ClassName*>(GetChild(Type)); } \
	inline void Set##ObjName(ClassName* __obj) { SetChild(Type, __obj); } \
	inline void Clear##ObjName() { RmChild(Type); } \
	inline bool Has##ObjName() { return nullptr != GetChild(Type); }

	Person_Property_Set_Get_Func(PContainerPack, CGLPrivatePack, ContainerPack);
	Person_Property_Set_Get_Func(PContainerBody, CGLPrivateBodyPack, ContainerBody);
	Person_Property_Set_Get_Func(PContainerStore, CGLPrivateStore, ContainerStore);
	Person_Property_Set_Get_Func(PContainerTrade, CGLPrivateTrade, ContainerTrade);
	Person_Property_Set_Get_Func(PContainerSoul, CGLSoulSpirit, ContainerSoul);
	Person_Property_Set_Get_Func(PContainerWeapon, CGLWeaponSlot, ContainerWeapon);
	Person_Property_Set_Get_Func(PContainerShanghui, CGLShanghui, ContainerShanghui);

public:
	CILogicPerson(void);
	~CILogicPerson(void);
	virtual void Init();

	//OneGroupBattleLookInfo* GetGroupInfo();
private:
	//OneGroupBattleLookInfo	m_TempGroupLookInfo;
};

